package com.djh.security.util;


import org.springframework.util.StringUtils;

/**
 * 认证异常信息处理工具类
 *
 * @author qipp
 * @date 2020/3/9 16:10
 * @since 1.0.1
 */
public class Oauth2ExceptionMessageUtil {


    /**
     * 获取异常信息中关键内容
     * @param message 异常信息
     * @return java.lang.String
     * @author qipp
     * @date 2020/3/9 14:36
     */
    public static String getExceptionMessage(String message){
        String msg = message.substring(message.lastIndexOf(": "));
        return StringUtils.isEmpty(msg.replace(":","")) ? ": 空值" : msg;
    }
}
